package com.woniu.payback_font.mapper;


import com.woniu.payback_font.entity.Account;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface AccountMapper {
    int deleteByPrimaryKey(Integer aId);

    int insert(Account record);

    Account selectByPrimaryKey(Integer aId);

    List<Account> selectAll();

    int updateByPrimaryKey(Account record);

    /**
     * 条件查询
     * @param aUid
     * @param aName
     * @param aMobile
     * @param aIdcar
     * @return
     */
    List<Account> selectAllList(@Param("aUid") String aUid, @Param("aName")String aName,
                                @Param("aMobile")String aMobile, @Param("aIdcar")String aIdcar);


    Account findOne(String aUid);

    /**
     * 借款金额账户更新
     * @param aDebtCapita 借款本金
     * @param aDebtInterest 借款利息
     * @param aUsedLimit 借款总额 = 借款本金 + 借款利息
     * @param aRepaymentDate 借款天数(1~28随即生成)
     */
    void updateByUid(@Param("aDebtCapita") BigDecimal aDebtCapita,
                     @Param("aDebtInterest") BigDecimal aDebtInterest,
                     @Param("aUsedLimit") BigDecimal aUsedLimit,
                     @Param("aRepaymentDate") Integer aRepaymentDate);
}